import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { iconData } from '../../../common/IconData';


@Component({
    selector: 'app-icon-select-table',
    templateUrl: 'index.html',
    styleUrls: ['index.scss']
})
export class IconSelectTableComponent implements OnInit{

    @Input()
    iconKey : string;
    @Output()
    iconKeyChange = new EventEmitter();

    protected readonly iconData = iconData;
    iconKeys:string[] = [];
    constructor() {
    }

    ngOnInit(): void {
        iconData.forEach((value, key, map)=>{
            this.iconKeys.push(key);
        })
    }

    onSelectIcon(item:string) {
        this.iconKey = item;
        this.iconKeyChange.emit(item);
    }

}
